import { get, post } from './http'

const baseUrl = '/h5/'

// 获取表单信息
export const getForm = (table_id: string) => get(baseUrl + 'form/', { params: { table_id } })

// 获取上次填写的内容
export const getLastFill = (table_id: string) => get(baseUrl + 'form/lastFill/', { params: { table_id } })

// 填写表单
export const putForm = (data: LooseObject) => post(baseUrl + 'form/', data)

// 上报表单
export const ecsForm = (data) => post('/officialWebsite/company/addCustomerInfo', data, { baseURL: import.meta.env.XMOV_APP_BAICHUAN_API })
